const routes = [
  {
    path: '/index',
    name: 'index',
    component: () => import( '../views/Index.vue'),
    children:[//二级路由
    {
      path: '/index/home',
      name: 'home',
      component: () => import( '../views/Index/Home.vue'),
      
    },
    {
      path: '/index/order',
      name: 'order',
      component: () => import( '../views/Index/Order.vue'),
      
    },
    {
      path: '/index/search',
      name: 'search',
      component: () => import( '../views/Index/Search.vue'),
      
    },
    {
      path: '/index/shop',
      name: 'shop',
      component: () => import( '../views/Index/Shop.vue'),
      
    },
    {
      path: '/index/find',
      name: 'find',
      component: () => import( '../views/Index/Find.vue'),
      
    },
  ]

  },
  {
    path: '/login',
    name: 'login',
    component: () => import( '../views/Login.vue'),
    
  },
  {
    path: '/detailed/id',
    name: 'detailed',
    component: () => import( '../views/Detailed.vue'),
    
  },
  
  {
    path:'/',
    redirect:'/index/home' //重定向
  },
  
   
  ]

 export default routes;